<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWxCardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wxcards', function (Blueprint $table) {
            $table->increments('id');
            $table->string('card_id', 80)->unique()->comment('微信卡券id')->index();
            $table->string('brand_name')->nullable()->comment('公司名称');
            $table->string('logo_url')->nullable()->comment('卡券logo');
            $table->string('code_type')->nullable();
            $table->string('title')->comment('卡券名称');
            $table->string('description')->comment('卡券描述');
            $table->string('sku')->comment('卡券库存')->index();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wxcards');
    }
}
